#if 0
//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.15.779.0000
//
//   fxc /T ps_2_a /E mainPSba /Fh
//    C:\Program Files\Rockstar Games\GTA San Andreas\extra_resources\shaders\veh_matref_sm2a_ba.txt
//    C:\Program Files\Rockstar Games\GTA San Andreas\extra_resources\shaders\veh_matref_sm2a.hlsl
//
//
// Parameters:
//
//   float4 LightColor1;
//   float4 MatAmbient;
//   float4 MatDiffuse;
//   float MatSpecPow;
//   sampler2D colorSampler;
//   samplerCUBE envSampler;
//   sampler2D normalSampler;
//   float refmult;
//   float4 sceneambient;
//
//
// Registers:
//
//   Name          Reg   Size
//   ------------- ----- ----
//   LightColor1   c0       1
//   MatDiffuse    c1       1
//   MatAmbient    c2       1
//   MatSpecPow    c3       1
//   refmult       c4       1
//   sceneambient  c5       1
//   colorSampler  s0       1
//   envSampler    s1       1
//   normalSampler s2       1
//
//
// Default values:
//
//   LightColor1
//     c0   = { 1, 1, 1, 1 };
//
//   MatDiffuse
//     c1   = { 1, 1, 1, 1 };
//
//   MatAmbient
//     c2   = { 0, 0, 0, 1 };
//
//   MatSpecPow
//     c3   = { 40, 0, 0, 0 };
//
//   refmult
//     c4   = { 0.5, 0, 0, 0 };
//
//   sceneambient
//     c5   = { 0, 0, 0, 1 };
//

    ps_2_x
    def c6, -0.5, 0, 0, 0
    dcl_pp t0.xy
    dcl_pp t1.xyz
    dcl_pp t2.xyz
    dcl_pp t3.xyz
    dcl_pp t4.xyz
    dcl_pp t5.xyz
    dcl_pp t6.xyz
    dcl_2d s0
    dcl_cube s1
    dcl_2d s2
    dp3_pp r0.z, t5, t5
    dp3_pp r0.w, t6, t6
    rsq_pp r0.z, r0.z
    rsq_pp r0.w, r0.w
    mul_pp r1.xyz, r0.z, t5.xzyw
    mul_pp r3.xyz, r0.w, t6.xzyw
    texld r0, t0, s2
    add_pp r0.xyz, r0.xyww, c6.x
    mul_pp r2.xyz, r3, r0.y
    dp3_pp r0.w, t2, t2
    mad_pp r1.xyz, r0.x, r1, r2
    rsq_pp r0.w, r0.w
    mad_pp r1.xyz, t2.xzyw, r0.w, r1
    mov_pp r2.xyz, t4
    add_pp r6.xyz, r2.xzyw, -t3.xzyw
    dp3_pp r0.w, r1, r1
    dp3_pp r0.y, r6, r6
    rsq_pp r0.w, r0.w
    rsq_pp r2.w, r0.y
    mul_pp r4.xyz, r1, r0.w
    mul_pp r1.xyz, r6, r2.w
    dp3_pp r0.w, r1, r4
    add_pp r0.w, r0.w, r0.w
    mad_pp r1.xyz, r4, -r0.w, r1
    mul_pp r2.xyz, r0.z, c0
    mov_pp r1.xyz, -r1
    texld_pp r0, t0, s0
    texld_pp r1, r1, s1
    nrm_pp r3.xyz, t1
    mad_pp r6.xyz, r6.xzyw, r2.w, r3
    nrm_pp r5.xyz, r6
    dp3_pp r1.w, r5.xzyw, r4
    dp3_pp r3.w, r3.xzyw, r4
    max_pp r2.w, r1.w, c6.y
    pow_pp r1.w, r2.w, c3.x
    max_pp r2.w, r3.w, c6.y
    mul_pp r3.xyz, r1, c4.x
    mul_pp r1.w, r1.w, r2.w
    mul_pp r1.xyz, r2.w, c0
    mov_pp r4.xyz, c2
    add_pp r4.xyz, r4, c5
    mad_pp r2.xyz, r1.w, r2, r3
    mad_pp r1.xyz, c1, r1, r4
    mad_pp r0.xyz, r1, r0, r2
    mul_pp r0.w, r0.w, c1.w
    mov_pp oC0, r0

// approximately 52 instruction slots used (3 texture, 49 arithmetic)
#endif

const DWORD g_ps21_mainPSba[] =
{
    0xffff0201, 0x0080fffe, 0x42415443, 0x0000001c, 0x000001c8, 0xffff0201, 
    0x00000009, 0x0000001c, 0x00000100, 0x000001c1, 0x000000d0, 0x00000002, 
    0x00000001, 0x000000dc, 0x000000ec, 0x000000fc, 0x00020002, 0x00000001, 
    0x000000dc, 0x00000108, 0x00000118, 0x00010002, 0x00000001, 0x000000dc, 
    0x000000ec, 0x00000123, 0x00030002, 0x00000001, 0x00000130, 0x00000140, 
    0x00000150, 0x00000003, 0x00000001, 0x00000160, 0x00000000, 0x00000170, 
    0x00010003, 0x00000001, 0x0000017c, 0x00000000, 0x0000018c, 0x00020003, 
    0x00000001, 0x00000160, 0x00000000, 0x0000019a, 0x00040002, 0x00000001, 
    0x00000130, 0x000001a4, 0x000001b4, 0x00050002, 0x00000001, 0x000000dc, 
    0x00000108, 0x6867694c, 0x6c6f4374, 0x0031726f, 0x00030001, 0x00040001, 
    0x00000001, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 
    0x4174614d, 0x6569626d, 0xab00746e, 0x00000000, 0x00000000, 0x00000000, 
    0x3f800000, 0x4474614d, 0x75666669, 0x4d006573, 0x70537461, 0x6f506365, 
    0xabab0077, 0x00030000, 0x00010001, 0x00000001, 0x00000000, 0x42200000, 
    0x00000000, 0x00000000, 0x00000000, 0x6f6c6f63, 0x6d615372, 0x72656c70, 
    0xababab00, 0x000c0004, 0x00010001, 0x00000001, 0x00000000, 0x53766e65, 
    0x6c706d61, 0xab007265, 0x000e0004, 0x00010001, 0x00000001, 0x00000000, 
    0x6d726f6e, 0x61536c61, 0x656c706d, 0x65720072, 0x6c756d66, 0xabab0074, 
    0x3f000000, 0x00000000, 0x00000000, 0x00000000, 0x6e656373, 0x626d6165, 
    0x746e6569, 0x5f737000, 0x00615f32, 0x7263694d, 0x666f736f, 0x52282074, 
    0x33442029, 0x20395844, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, 
    0x35312e39, 0x3937372e, 0x3030302e, 0xabab0030, 0x05000051, 0xa00f0006, 
    0xbf000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000, 
    0xb0230000, 0x0200001f, 0x80000000, 0xb0270001, 0x0200001f, 0x80000000, 
    0xb0270002, 0x0200001f, 0x80000000, 0xb0270003, 0x0200001f, 0x80000000, 
    0xb0270004, 0x0200001f, 0x80000000, 0xb0270005, 0x0200001f, 0x80000000, 
    0xb0270006, 0x0200001f, 0x90000000, 0xa00f0800, 0x0200001f, 0x98000000, 
    0xa00f0801, 0x0200001f, 0x90000000, 0xa00f0802, 0x03000008, 0x80240000, 
    0xb0e40005, 0xb0e40005, 0x03000008, 0x80280000, 0xb0e40006, 0xb0e40006, 
    0x02000007, 0x80240000, 0x80aa0000, 0x02000007, 0x80280000, 0x80ff0000, 
    0x03000005, 0x80270001, 0x80aa0000, 0xb0d80005, 0x03000005, 0x80270003, 
    0x80ff0000, 0xb0d80006, 0x03000042, 0x800f0000, 0xb0e40000, 0xa0e40802, 
    0x03000002, 0x80270000, 0x80f40000, 0xa0000006, 0x03000005, 0x80270002, 
    0x80e40003, 0x80550000, 0x03000008, 0x80280000, 0xb0e40002, 0xb0e40002, 
    0x04000004, 0x80270001, 0x80000000, 0x80e40001, 0x80e40002, 0x02000007, 
    0x80280000, 0x80ff0000, 0x04000004, 0x80270001, 0xb0d80002, 0x80ff0000, 
    0x80e40001, 0x02000001, 0x80270002, 0xb0e40004, 0x03000002, 0x80270006, 
    0x80d80002, 0xb1d80003, 0x03000008, 0x80280000, 0x80e40001, 0x80e40001, 
    0x03000008, 0x80220000, 0x80e40006, 0x80e40006, 0x02000007, 0x80280000, 
    0x80ff0000, 0x02000007, 0x80280002, 0x80550000, 0x03000005, 0x80270004, 
    0x80e40001, 0x80ff0000, 0x03000005, 0x80270001, 0x80e40006, 0x80ff0002, 
    0x03000008, 0x80280000, 0x80e40001, 0x80e40004, 0x03000002, 0x80280000, 
    0x80ff0000, 0x80ff0000, 0x04000004, 0x80270001, 0x80e40004, 0x81ff0000, 
    0x80e40001, 0x03000005, 0x80270002, 0x80aa0000, 0xa0e40000, 0x02000001, 
    0x80270001, 0x81e40001, 0x03000042, 0x802f0000, 0xb0e40000, 0xa0e40800, 
    0x03000042, 0x802f0001, 0x80e40001, 0xa0e40801, 0x02000024, 0x80270003, 
    0xb0e40001, 0x04000004, 0x80270006, 0x80d80006, 0x80ff0002, 0x80e40003, 
    0x02000024, 0x80270005, 0x80e40006, 0x03000008, 0x80280001, 0x80d80005, 
    0x80e40004, 0x03000008, 0x80280003, 0x80d80003, 0x80e40004, 0x0300000b, 
    0x80280002, 0x80ff0001, 0xa0550006, 0x03000020, 0x80280001, 0x80ff0002, 
    0xa0000003, 0x0300000b, 0x80280002, 0x80ff0003, 0xa0550006, 0x03000005, 
    0x80270003, 0x80e40001, 0xa0000004, 0x03000005, 0x80280001, 0x80ff0001, 
    0x80ff0002, 0x03000005, 0x80270001, 0x80ff0002, 0xa0e40000, 0x02000001, 
    0x80270004, 0xa0e40002, 0x03000002, 0x80270004, 0x80e40004, 0xa0e40005, 
    0x04000004, 0x80270002, 0x80ff0001, 0x80e40002, 0x80e40003, 0x04000004, 
    0x80270001, 0xa0e40001, 0x80e40001, 0x80e40004, 0x04000004, 0x80270000, 
    0x80e40001, 0x80e40000, 0x80e40002, 0x03000005, 0x80280000, 0x80ff0000, 
    0xa0ff0001, 0x02000001, 0x802f0800, 0x80e40000, 0x0000ffff
};
